package com.itheima.project.knowledge;


import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;

import java.util.List;

public class SubPageViewPageAdapter extends FragmentStatePagerAdapter {
    private List<SubPageContentFragment> mSubPageList;

    public SubPageViewPageAdapter(
            FragmentManager fm,
            List<SubPageContentFragment> subPageList) {
        super(fm);
        this.mSubPageList = subPageList;
    }

    @Override
    public Fragment getItem(int i) {
        return mSubPageList.get(i);
    }

    @Override
    public int getCount() {
        return mSubPageList.size();
    }

}
